import request from '@/utils/request'

const externalApi = {
    queryRechargeProductOrderForm: '/web/query/recharge/product/order/form', // 查询充值产品订单
    updateRechargeProductOrderForm: '/web/update/recharge/product/order/form', // 修改充值订单状态
    refundRechargeProductOrderForm: '/web/refund/recharge/product/order/form', // 充值产品订单退款
    queryRechargeProductClassification: '/web/query/recharge/product/classification', // 查询充值产品分类
    updateRechargeProductClassification: '/web/update/recharge/product/classification', // 新增、修改、删除充值产品分类
    queryRechargeProductChannelConfig: '/web/query/recharge/product/channel/config', // 查询充值产品渠道配置
    updateRechargeProductChannelConfig: '/web/update/recharge/product/channel/config', // 新增、修改、删除充值产品渠道配置
    queryRechargeProductInfo: '/web/query/recharge/product/info', // 查询充值产品信息
    updateRechargeProductInfo: '/web/update/recharge/product/info', // 添加、修改、删除充值产品信息
}

// 查询充值产品订单
export function queryRechargeProductOrderForm (parameter) {
    return request({
        url: externalApi.queryRechargeProductOrderForm,
        method: 'post',
        headers: {
            'name':'queryRechargeProductOrderForm',
        },
        data: parameter
    })
}
// 修改充值订单状态
export function updateRechargeProductOrderForm (parameter) {
    return request({
        url: externalApi.updateRechargeProductOrderForm,
        method: 'post',
        headers: {
            'name':'updateRechargeProductOrderForm',
        },
        data: parameter
    })
}
// 充值产品订单退款
export function refundRechargeProductOrderForm (parameter) {
    return request({
        url: externalApi.refundRechargeProductOrderForm,
        method: 'post',
        headers: {
            'name':'refundRechargeProductOrderForm',
        },
        data: parameter
    })
}

// 查询充值产品分类
export function queryRechargeProductClassification (parameter) {
    return request({
        url: externalApi.queryRechargeProductClassification,
        method: 'post',
        headers: {
            'name':'queryRechargeProductClassification',
        },
        data: parameter
    })
}
// 新增、修改、删除充值产品分类
export function updateRechargeProductClassification (parameter) {
    return request({
        url: externalApi.updateRechargeProductClassification,
        method: 'post',
        headers: {
            'name':'updateRechargeProductClassification',
        },
        data: parameter
    })
}

// 查询充值产品渠道配置
export function queryRechargeProductChannelConfig (parameter) {
    return request({
        url: externalApi.queryRechargeProductChannelConfig,
        method: 'post',
        headers: {
            'name':'queryRechargeProductChannelConfig',
        },
        data: parameter
    })
}
// 新增、修改、删除充值产品渠道配置
export function updateRechargeProductChannelConfig (parameter) {
    return request({
        url: externalApi.updateRechargeProductChannelConfig,
        method: 'post',
        headers: {
            'name':'updateRechargeProductChannelConfig',
        },
        data: parameter
    })
}

// 查询充值产品信息
export function queryRechargeProductInfo (parameter) {
    return request({
        url: externalApi.queryRechargeProductInfo,
        method: 'post',
        headers: {
            'name':'queryRechargeProductInfo',
        },
        data: parameter
    })
}
// 新增、修改、删除充值产品信息
export function updateRechargeProductInfo (parameter) {
    return request({
        url: externalApi.updateRechargeProductInfo,
        method: 'post',
        headers: {
            'name':'updateRechargeProductInfo',
        },
        data: parameter
    })
}